﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


public class Player
{
    /// <summary>
    /// 玩家GUID
    /// </summary>
    public uint guid;
    /// <summary>
    /// 所在房间号
    /// </summary>
    public int roomId = -1;
    public Player(uint guid)
    {
        this.guid = guid;
    }
    /// <summary>
    /// TCP发送
    /// </summary>
    /// <param name="msg"></param>
    public void Send(MsgBase msg)
    {
        Console.WriteLine("msg:" + msg.protoName + ",guid:" + guid);
        NetManager.Send(msg, guid);
    }
    /// <summary>
    /// UDP发送
    /// </summary>
    /// <param name="msg"></param>
    public void SendTo(MsgBase msg)
    {
        NetManager.SendTo(msg, guid);
    }
}

